home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 138
/
Volume 138 Aug 19 2011 - Damaged.iso
/
Games
/
star-rebellion.swf
/
scripts
/
GameStage.as
< prev
next >
Wrap
Text File
|
2011-08-19
|
2KB
|
93 lines
package
{
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.ProgressEvent;
import flash.system.Security;
import flash.ui.ContextMenu;
public class GameStage extends MovieClip
{
public static var main_stage = null;
public static var main_holder:Sprite = null;
public var assets_bibb:MovieClip;
public var main_menu:MovieClip;
public var loadingMC:MovieClip;
public var §\x01\x01\x02\x03§:Boolean = false;
public function GameStage()
{
§\x01\x01\x02\x03§ = false;
super();
addFrameScript(0,§\x01\x01\x01\x0e§,4,§\x01\x01\x01\x0f§);
Security.allowDomain("*");
}
function §\x01\x01\x01\x0e§() : *
{
stop();
if(§\x01\x01\x02\x03§)
{
gotoAndStop(10);
}
else
{
loaderInfo.addEventListener(ProgressEvent.PROGRESS,§\x01\x01\x01\x10§);
}
}
function §\x01\x01\x01\x0f§() : *
{
MochiBot.track(this,"c5c869c1");
}
public function §\x01\x01\x01\x10§(param1:ProgressEvent) : void
{
var _loc2_:Number = NaN;
_loc2_ = Math.floor(param1.bytesLoaded * 100 / param1.bytesTotal);
if(loadingMC is MovieClip)
{
loadingMC.progress_mc.gotoAndStop(_loc2_);
loadingMC.loaded_txt.text = "Loaded: " + _loc2_.toString() + "%";
}
if(_loc2_ >= 100)
{
loadingMC.progress_mc.stop();
loadingMC.progress_mc.visible = false;
removeChild(loadingMC);
loadingMC = null;
play();
}
}
public function §\x01\x01\x02\x02§() : void
{
var _loc1_:ContextMenu = null;
if(§\x01\x01\x02\x03§)
{
return;
}
removeChild(assets_bibb);
assets_bibb = null;
main_stage = this.stage;
_loc1_ = new ContextMenu();
_loc1_.hideBuiltInItems();
contextMenu = _loc1_;
main_menu.initGame(this);
§\x01\x01\x02\x03§ = true;
}
public function §\x01\x01\x02\x05§() : void
{
main_menu.visible = true;
}
}
}